<template>
  <!-- 地图分析页 -->
  <view class="content">
	 <!-- <uni-nav-bar left-icon="back" left-text="返回" right-text="菜单" title="导航栏组件"></uni-nav-bar> -->
    <!-- <cc-heard title='地图分析' color="#fff"></cc-heard> -->
	
	
	
    <view class="map">
 <!-- <web-view :src='"/static/map/map.html?token="+this.token' @message="reciveMessage"
  @onPostMessage="recivePostMessage"></web-view> -->
  <web-view :src="'http://huizhouhuanjing.cn:84/map.html?token='+token" @message="reciveMessage"
  @onPostMessage="recivePostMessage"></web-view>
      <!-- <web-view :src='"http://jiance.cn1.utools.club/map.html"'></web-view> -->
      <!-- <iframe src="../static/map/map.html"></iframe> -->
    </view>
    <!-- <view class="map">
      <view class="page-body">
        <view class="page-section page-section-gap">
          <map style="width: 100%; height: 1150rpx;" :latitude="latitude" :longitude="longitude" :markers="covers">
          </map>
        </view>
      </view>
    </view> -->
  </view>
</template>

<script>
	
  export default {
    data() {
      return {
		  token:'',//
        //id:0, // 使用 marker点击事件 需要填写id
        // title: 'map',
        // latitude: 39.909,
        // longitude: 116.39742,
        // covers: [{
        //     latitude: 39.909,
        //     longitude: 116.39742,
        //     iconPath: '../../../static/location.png'
        // }, {
        //     latitude: 39.90,
        //     longitude: 116.39,
        //     iconPath: '../../../static/location.png'
        // }]
        list: [],
        list0: [],
        list1: [],
        list2: [],
        list3: [],
      }
    },
    onLoad() {
	  this.token = encodeURIComponent(uni.getStorageSync('token')||'1111') 
    console.log(this.token);
    },
	onShow() {
		// this.getmap()
	},
    methods: {
		reciveMessage(e){
			console.log('reciveMessage',e)
			uni.navigateTo({
				url:'../enterprise_information/enterprise_information?id='+e.detail.data[0].company_id
			})
		},
		recivePostMessage(e){
			console.log('recivePostMessage',e)
		},
      // 预警报警统计和检测浓度排名
      getmap() {
        this.$http.get('/app/homepage/enterpriseAnalysisMore', {}).then(res => {
			  console.log('res0000000000',res)
          if (res.code == '00000') {
            this.list = res.data.list
     
          }

        })
      },
    }
  }
</script>

<style lang="scss" scoped>
  .content {
    width: 100%;
    height: 100vh;
    background: #F7F7F7;
    overflow: hidden;
  }

  .map {
    margin-top: calc(88rpx + var(--status-bar-height));
  }
</style>
